Current Location: Home> Function Categories> expm1

expm1

Returns exp(number) - 1, and can calculate the exact result even when the value of number is close to zero.
Name:expm1
Category:math
Programming Language:php
One-line Description:Returns the value of -1 to the power of E.

Definition and usage

expm1() function returns exp(x) - 1, and can calculate the exact result even when the value of number is close to zero.

Example

In this example, we will apply the expm1() function to different numbers:

 <?php
echo ( expm1 ( 1 ) ) ;
echo ( expm1 ( - 1 ) ) ;
echo ( expm1 ( 5 ) ) ;
echo ( expm1 ( 10 ) )
?>

Try it yourself

grammar

 expm1 ( x )
parameter describe
x Required. A number.

illustrate

expm1() returns 'exp(x) - 1', and the accurate result can be calculated even when the value of x is close to zero. But when two values ​​approach equal, 'exp (x) - 1' becomes inaccurate.

Similar Functions
  • Find the minimum value min

    min

    Findtheminimumvalue
  • Find the maximum value max

    max

    Findthemaximumvalue
  • Tilt tan

    tan

    Tilt
  • Absolute value abs

    abs

    Absolutevalue
  • Convert radians to corresponding angles rad2deg

    rad2deg

    Convertradianstocorr
  • Convert decimal to hexadecimal dechex

    dechex

    Convertdecimaltohexa
  • Combined linear congruent generator lcg_value

    lcg_value

    Combinedlinearcongru
  • Returns log(1 + number), and can calculate the exact result even when the value of number is close to zero. log1p

    log1p

    Returnslog(1+number)
Popular Articles